{
 "metadata": {
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3-final"
  },
  "orig_nbformat": 2,
  "kernelspec": {
   "name": "python383jvsc74a57bd095ab7303ed2746327945aa376054eddca8c4eca362915ff95db932dbe7e7ee41",
   "display_name": "Python 3.8.3 64-bit"
  },
  "metadata": {
   "interpreter": {
    "hash": "95ab7303ed2746327945aa376054eddca8c4eca362915ff95db932dbe7e7ee41"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2,
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "Empty DataFrame\nColumns: [111, 112, 121, 122, 123, 210, 220]\nIndex: []\n"
     ]
    },
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "      111  112  121  122  123 210   220\n",
       "北京市  3430  426  214  202  298  21  2679"
      ],
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>111</th>\n      <th>112</th>\n      <th>121</th>\n      <th>122</th>\n      <th>123</th>\n      <th>210</th>\n      <th>220</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>北京市</th>\n      <td>3430</td>\n      <td>426</td>\n      <td>214</td>\n      <td>202</td>\n      <td>298</td>\n      <td>21</td>\n      <td>2679</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "metadata": {},
     "execution_count": 11
    }
   ],
   "source": [
    "import pandas as pd\r\n",
    "dt = pd.DataFrame(columns=[\"111\", \"112\", \"121\",\r\n",
    "                                \"122\", \"123\", \"210\", \"220\"])\r\n",
    "print(dt)\r\n",
    "test = {'111': 3430, '112': 426, '121': 214, '122': 202, '123': 298, '210': 21, '220': 2679}\r\n",
    "dt.append(pd.Series(test, name='北京市'))\r\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "100\n"
     ]
    }
   ],
   "source": [
    "import json\n",
    "with open(\"assets/family_name.json\") as f:\n",
    "    task3 = json.load(f)\n",
    "print(len(task3))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "datetime.timedelta"
      ]
     },
     "metadata": {},
     "execution_count": 1
    }
   ],
   "source": [
    "from datetime import datetime\n",
    "start = datetime.now()\n",
    "type(datetime.now() - start)"
   ]
  }
 ]
}